package com.louis.di_test;

import org.apache.logging.log4j.core.util.JsonUtils;

import java.util.List;

/**
 * @author XRY
 * @date 2023年06月23日11:08
 */
//部门类
public class Department {
    private String dname;
    private List<Employee> empList;

    public List<Employee> getEmpList() {
        return empList;
    }

    public void setEmpList(List<Employee> empList) {
        this.empList = empList;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public void info(){
        System.out.println("Department name");
        for(Employee employee:empList){
            System.out.println("employee.geteName() = " + employee.geteName());
        }
    }

    @Override
    public String toString() {
        return "Department{" +
                "dname='" + dname + '\'' +
                ", empList=" + empList +
                '}';
    }
}
